/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package toesp.entity;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author satria.sp
 */
@Entity
@Table(name = "sms")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Sms.findAll", query = "SELECT s FROM Sms s")})
public class Sms implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "sms_id")
    private Integer smsId;
    @Basic(optional = false)
    @Column(name = "sms_nohp")
    private String smsNohp;
    @Basic(optional = false)
    @Lob
    @Column(name = "sms_pesan")
    private String smsPesan;
    @Basic(optional = false)
    @Column(name = "sms_create")
    @Temporal(TemporalType.TIMESTAMP)
    private Date smsCreate;
    @Basic(optional = false)
    @Column(name = "sms_send")
    @Temporal(TemporalType.TIMESTAMP)
    private Date smsSend;

    public Sms() {
    }

    public Sms(Integer smsId) {
        this.smsId = smsId;
    }

    public Sms(Integer smsId, String smsNohp, String smsPesan, Date smsCreate, Date smsSend) {
        this.smsId = smsId;
        this.smsNohp = smsNohp;
        this.smsPesan = smsPesan;
        this.smsCreate = smsCreate;
        this.smsSend = smsSend;
    }

    public Integer getSmsId() {
        return smsId;
    }

    public void setSmsId(Integer smsId) {
        this.smsId = smsId;
    }

    public String getSmsNohp() {
        return smsNohp;
    }

    public void setSmsNohp(String smsNohp) {
        this.smsNohp = smsNohp;
    }

    public String getSmsPesan() {
        return smsPesan;
    }

    public void setSmsPesan(String smsPesan) {
        this.smsPesan = smsPesan;
    }

    public Date getSmsCreate() {
        return smsCreate;
    }

    public void setSmsCreate(Date smsCreate) {
        this.smsCreate = smsCreate;
    }

    public Date getSmsSend() {
        return smsSend;
    }

    public void setSmsSend(Date smsSend) {
        this.smsSend = smsSend;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (smsId != null ? smsId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Sms)) {
            return false;
        }
        Sms other = (Sms) object;
        if ((this.smsId == null && other.smsId != null) || (this.smsId != null && !this.smsId.equals(other.smsId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "toesp.entity.Sms[ smsId=" + smsId + " ]";
    }
    
}
